package org.example.canteen.repository;

import org.example.canteen.entity.Dish;
import org.example.canteen.entity.FoodsMaterial;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/*
   ID是UUID或其他非数字格式  用ElasticsearchRepository<Dish, String>
   ID是自然增长的数字，使用Long更高效
   ctrl+F12 查看所有方法
 */
@Repository
public interface DishRepository extends ElasticsearchRepository<Dish, Long> {
    //命名规范 https://docs.spring.io/spring-data/elasticsearch/docs/3.0.6.RELEASE/reference/html/#elasticsearch.repositories
    List<Dish> findDishByDescription(String desc);
}
